package com.jc.utils;

import java.util.List;

/**
 * 封装所有需要分页的查询结果
 *
 * @author wb-lixiaolong
 * @param <T>
 *
 */
public class SearchResult<T> {

    /**
     * 查询结果集
     */
    private List<T> list;

    /**
     * 总记录条数
     */
    private Integer recordCount = 0;

    /**
     * 分页页数
     */
    private Integer pageNum;

    public SearchResult() {
    }

    public SearchResult(List<T> list, Integer recordCount, Integer pageNum) {
        this.list = list;
        this.recordCount = recordCount;
        this.pageNum = pageNum;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

    public Integer getRecordCount() {
        return recordCount;
    }

    public void setRecordCount(Integer recordCount) {
        this.recordCount = (null == recordCount ? Integer.valueOf(0) : recordCount);
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = (null == pageNum ? Integer.valueOf(0) : pageNum);
    }
}
